<?php /* Smarty version 2.6.26, created on 2012-05-12 15:00:38
         compiled from blocks%5Ccategories.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'cat', 'blocks\\categories.tpl', 5, false),array('modifier', 'count', 'blocks\\categories.tpl', 9, false),array('modifier', 'replace', 'blocks\\categories.tpl', 10, false),array('modifier', 'ceil', 'blocks\\categories.tpl', 67, false),array('function', 'rlHook', 'blocks\\categories.tpl', 7, false),array('function', 'math', 'blocks\\categories.tpl', 9, false),)), $this); ?>
<!-- categories block tpl -->

<?php if (! empty ( $this->_tpl_vars['categories'] )): ?>

	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'content_block_header.tpl') : smarty_modifier_cat($_tmp, 'content_block_header.tpl')), 'smarty_include_vars' => array('name' => $this->_tpl_vars['lang']['categories'],'no_padding' => true,'no_margin' => $this->_tpl_vars['no_margin'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

	<?php echo rlHook::load(array('name' => 'browsePreCategories'), $this);?>

	
	<?php echo smarty_function_math(array('assign' => 'pages_number','equation' => 'ceil(count/num)','count' => count($this->_tpl_vars['categories']),'num' => $this->_tpl_vars['listing_type']['Cat_visible_number']), $this);?>

	<div class="categories" id="categories_<?php echo ((is_array($_tmp=$this->_tpl_vars['listing_type']['Key'])) ? $this->_run_mod_handler('replace', true, $_tmp, '_', '') : smarty_modifier_replace($_tmp, '_', '')); ?>
_<?php echo $this->_tpl_vars['pages_number']; ?>
">
		<ul>
			<li>
			<table class="fixed">
			<tr>
			<?php $_from = $this->_tpl_vars['categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['fCats'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fCats']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['cat']):
        $this->_foreach['fCats']['iteration']++;
?>
				<td valign="top">
					<div class="item">
						<?php echo rlHook::load(array('name' => 'tplPreCategory'), $this);?>

						<a class="category" title="<?php echo $this->_tpl_vars['cat']['name']; ?>
" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['cat']['Path']; ?>
<?php if ($this->_tpl_vars['listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;category=<?php echo $this->_tpl_vars['cat']['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['cat']['name']; ?>
</a>
						<?php if ($this->_tpl_vars['listing_type']['Cat_listing_counter']): ?>
							<span>(<b><?php echo $this->_tpl_vars['cat']['Count']; ?>
</b>)</span>
						<?php endif; ?>
						<?php echo rlHook::load(array('name' => 'tplPostCategory'), $this);?>

						
						<?php if (! empty ( $this->_tpl_vars['cat']['sub_categories'] ) && $this->_tpl_vars['listing_type']['Cat_show_subcats']): ?>
						<div class="sub_categories">
							<?php if ($this->_tpl_vars['listing_type']['Cat_subcat_number']): ?>
								<?php unset($this->_sections['sub_cat']);
$this->_sections['sub_cat']['loop'] = is_array($_loop=$this->_tpl_vars['cat']['sub_categories']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['sub_cat']['name'] = 'sub_cat';
$this->_sections['sub_cat']['max'] = (int)$this->_tpl_vars['listing_type']['Cat_subcat_number'];
$this->_sections['sub_cat']['show'] = true;
if ($this->_sections['sub_cat']['max'] < 0)
    $this->_sections['sub_cat']['max'] = $this->_sections['sub_cat']['loop'];
$this->_sections['sub_cat']['step'] = 1;
$this->_sections['sub_cat']['start'] = $this->_sections['sub_cat']['step'] > 0 ? 0 : $this->_sections['sub_cat']['loop']-1;
if ($this->_sections['sub_cat']['show']) {
    $this->_sections['sub_cat']['total'] = min(ceil(($this->_sections['sub_cat']['step'] > 0 ? $this->_sections['sub_cat']['loop'] - $this->_sections['sub_cat']['start'] : $this->_sections['sub_cat']['start']+1)/abs($this->_sections['sub_cat']['step'])), $this->_sections['sub_cat']['max']);
    if ($this->_sections['sub_cat']['total'] == 0)
        $this->_sections['sub_cat']['show'] = false;
} else
    $this->_sections['sub_cat']['total'] = 0;
if ($this->_sections['sub_cat']['show']):

            for ($this->_sections['sub_cat']['index'] = $this->_sections['sub_cat']['start'], $this->_sections['sub_cat']['iteration'] = 1;
                 $this->_sections['sub_cat']['iteration'] <= $this->_sections['sub_cat']['total'];
                 $this->_sections['sub_cat']['index'] += $this->_sections['sub_cat']['step'], $this->_sections['sub_cat']['iteration']++):
$this->_sections['sub_cat']['rownum'] = $this->_sections['sub_cat']['iteration'];
$this->_sections['sub_cat']['index_prev'] = $this->_sections['sub_cat']['index'] - $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['index_next'] = $this->_sections['sub_cat']['index'] + $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['first']      = ($this->_sections['sub_cat']['iteration'] == 1);
$this->_sections['sub_cat']['last']       = ($this->_sections['sub_cat']['iteration'] == $this->_sections['sub_cat']['total']);
?>
									<?php echo rlHook::load(array('name' => 'tplPreSubCategory'), $this);?>

									<a title="<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['Path']; ?>
<?php if ($this->_tpl_vars['listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;category=<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
</a><?php if ($this->_sections['sub_cat']['last']): ?><?php if (count($this->_tpl_vars['cat']['sub_categories']) > $this->_tpl_vars['listing_type']['Cat_subcat_number']): ?><span class="more" title="<?php echo $this->_tpl_vars['lang']['show_other_categories']; ?>
">&nbsp;&raquo;</span><?php endif; ?><?php else: ?>, <?php endif; ?>
								<?php endfor; endif; ?>
								
								<div class="hide other_categories">
									<?php unset($this->_sections['sub_cat']);
$this->_sections['sub_cat']['loop'] = is_array($_loop=$this->_tpl_vars['cat']['sub_categories']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['sub_cat']['name'] = 'sub_cat';
$this->_sections['sub_cat']['start'] = (int)$this->_tpl_vars['listing_type']['Cat_subcat_number'];
$this->_sections['sub_cat']['show'] = true;
$this->_sections['sub_cat']['max'] = $this->_sections['sub_cat']['loop'];
$this->_sections['sub_cat']['step'] = 1;
if ($this->_sections['sub_cat']['start'] < 0)
    $this->_sections['sub_cat']['start'] = max($this->_sections['sub_cat']['step'] > 0 ? 0 : -1, $this->_sections['sub_cat']['loop'] + $this->_sections['sub_cat']['start']);
else
    $this->_sections['sub_cat']['start'] = min($this->_sections['sub_cat']['start'], $this->_sections['sub_cat']['step'] > 0 ? $this->_sections['sub_cat']['loop'] : $this->_sections['sub_cat']['loop']-1);
if ($this->_sections['sub_cat']['show']) {
    $this->_sections['sub_cat']['total'] = min(ceil(($this->_sections['sub_cat']['step'] > 0 ? $this->_sections['sub_cat']['loop'] - $this->_sections['sub_cat']['start'] : $this->_sections['sub_cat']['start']+1)/abs($this->_sections['sub_cat']['step'])), $this->_sections['sub_cat']['max']);
    if ($this->_sections['sub_cat']['total'] == 0)
        $this->_sections['sub_cat']['show'] = false;
} else
    $this->_sections['sub_cat']['total'] = 0;
if ($this->_sections['sub_cat']['show']):

            for ($this->_sections['sub_cat']['index'] = $this->_sections['sub_cat']['start'], $this->_sections['sub_cat']['iteration'] = 1;
                 $this->_sections['sub_cat']['iteration'] <= $this->_sections['sub_cat']['total'];
                 $this->_sections['sub_cat']['index'] += $this->_sections['sub_cat']['step'], $this->_sections['sub_cat']['iteration']++):
$this->_sections['sub_cat']['rownum'] = $this->_sections['sub_cat']['iteration'];
$this->_sections['sub_cat']['index_prev'] = $this->_sections['sub_cat']['index'] - $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['index_next'] = $this->_sections['sub_cat']['index'] + $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['first']      = ($this->_sections['sub_cat']['iteration'] == 1);
$this->_sections['sub_cat']['last']       = ($this->_sections['sub_cat']['iteration'] == $this->_sections['sub_cat']['total']);
?>
										<?php echo rlHook::load(array('name' => 'tplPreSubCategory'), $this);?>

										<a title="<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['listing_type']['Page_key']]; ?>
/<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['Path']; ?>
<?php if ($this->_tpl_vars['listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['listing_type']['Page_key']]; ?>
&amp;category=<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
</a><?php if (! $this->_sections['sub_cat']['last']): ?>, <?php endif; ?>
									<?php endfor; endif; ?>
								</div>
							<?php else: ?>
								<?php $_from = $this->_tpl_vars['cat']['sub_categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['subCatF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['subCatF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['sub_cat']):
        $this->_foreach['subCatF']['iteration']++;
?>
									<?php echo rlHook::load(array('name' => 'tplPreSubCategory'), $this);?>

									<a title="<?php echo $this->_tpl_vars['sub_cat']['name']; ?>
" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
/<?php echo $this->_tpl_vars['sub_cat']['Path']; ?>
<?php if ($this->_tpl_vars['listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pageInfo']['Path']; ?>
&amp;category=<?php echo $this->_tpl_vars['sub_cat']['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['sub_cat']['name']; ?>
</a><?php if (! ($this->_foreach['subCatF']['iteration'] == $this->_foreach['subCatF']['total'])): ?>, <?php endif; ?>
								<?php endforeach; endif; unset($_from); ?>
							<?php endif; ?>
						</div>
						<?php endif; ?>
					</div>
				</td>
				
				<?php if ($this->_foreach['fCats']['iteration']%$this->_tpl_vars['listing_type']['Cat_columns_number'] == 0 && ( $this->_foreach['fCats']['iteration']%$this->_tpl_vars['listing_type']['Cat_visible_number'] != 0 || ! $this->_tpl_vars['listing_type']['Cat_visible_number'] ) && ! ($this->_foreach['fCats']['iteration'] == $this->_foreach['fCats']['total'])): ?>
				</tr>
				<tr>
				<?php endif; ?>
				
				<?php if ($this->_foreach['fCats']['iteration']%$this->_tpl_vars['listing_type']['Cat_visible_number'] == 0 && $this->_tpl_vars['listing_type']['Cat_visible_number'] && ! ($this->_foreach['fCats']['iteration'] == $this->_foreach['fCats']['total'])): ?>
				</tr>
				</table>
				<?php if ($this->_tpl_vars['listing_type']['Cat_visible_number']): ?>
				</li><li class="hide">
				<?php endif; ?>
				<table class="sTable" style="table-layout: fixed;">
				<tr>
				<?php endif; ?>
			<?php endforeach; endif; unset($_from); ?>
			<?php if ($this->_foreach['fCats']['total']%$this->_tpl_vars['listing_type']['Cat_columns_number'] != 0): ?>
				<?php echo smarty_function_math(array('assign' => 'rest','equation' => '(ceil(total/cols)*cols) - total','total' => $this->_foreach['fCats']['total'],'cols' => $this->_tpl_vars['listing_type']['Cat_columns_number']), $this);?>

				<?php unset($this->_sections['rest']);
$this->_sections['rest']['name'] = 'rest';
$this->_sections['rest']['loop'] = is_array($_loop=((is_array($_tmp=$this->_tpl_vars['rest'])) ? $this->_run_mod_handler('ceil', true, $_tmp) : ceil($_tmp))) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['rest']['show'] = true;
$this->_sections['rest']['max'] = $this->_sections['rest']['loop'];
$this->_sections['rest']['step'] = 1;
$this->_sections['rest']['start'] = $this->_sections['rest']['step'] > 0 ? 0 : $this->_sections['rest']['loop']-1;
if ($this->_sections['rest']['show']) {
    $this->_sections['rest']['total'] = $this->_sections['rest']['loop'];
    if ($this->_sections['rest']['total'] == 0)
        $this->_sections['rest']['show'] = false;
} else
    $this->_sections['rest']['total'] = 0;
if ($this->_sections['rest']['show']):

            for ($this->_sections['rest']['index'] = $this->_sections['rest']['start'], $this->_sections['rest']['iteration'] = 1;
                 $this->_sections['rest']['iteration'] <= $this->_sections['rest']['total'];
                 $this->_sections['rest']['index'] += $this->_sections['rest']['step'], $this->_sections['rest']['iteration']++):
$this->_sections['rest']['rownum'] = $this->_sections['rest']['iteration'];
$this->_sections['rest']['index_prev'] = $this->_sections['rest']['index'] - $this->_sections['rest']['step'];
$this->_sections['rest']['index_next'] = $this->_sections['rest']['index'] + $this->_sections['rest']['step'];
$this->_sections['rest']['first']      = ($this->_sections['rest']['iteration'] == 1);
$this->_sections['rest']['last']       = ($this->_sections['rest']['iteration'] == $this->_sections['rest']['total']);
?>
					<td></td>
				<?php endfor; endif; ?>			
			<?php endif; ?>
			</tr>
			</table>
			</li>
		</ul>
		<div class="clear"></div>
	</div>
	
	<?php if ($this->_foreach['fCats']['total'] > $this->_tpl_vars['listing_type']['Cat_visible_number'] && $this->_tpl_vars['listing_type']['Cat_visible_number']): ?>
		<?php $this->assign('pages_number', $this->_foreach['fCats']['total']/$this->_tpl_vars['listing_type']['Cat_visible_number']); ?>
		<div class="slider_bar">
			<div class="prev hide" title="<?php echo $this->_tpl_vars['lang']['show_previous_categories']; ?>
"></div>
			<div class="navigation">
				<?php unset($this->_sections['slide_page']);
$this->_sections['slide_page']['name'] = 'slide_page';
$this->_sections['slide_page']['loop'] = is_array($_loop=((is_array($_tmp=$this->_tpl_vars['pages_number'])) ? $this->_run_mod_handler('ceil', true, $_tmp) : ceil($_tmp))) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['slide_page']['show'] = true;
$this->_sections['slide_page']['max'] = $this->_sections['slide_page']['loop'];
$this->_sections['slide_page']['step'] = 1;
$this->_sections['slide_page']['start'] = $this->_sections['slide_page']['step'] > 0 ? 0 : $this->_sections['slide_page']['loop']-1;
if ($this->_sections['slide_page']['show']) {
    $this->_sections['slide_page']['total'] = $this->_sections['slide_page']['loop'];
    if ($this->_sections['slide_page']['total'] == 0)
        $this->_sections['slide_page']['show'] = false;
} else
    $this->_sections['slide_page']['total'] = 0;
if ($this->_sections['slide_page']['show']):

            for ($this->_sections['slide_page']['index'] = $this->_sections['slide_page']['start'], $this->_sections['slide_page']['iteration'] = 1;
                 $this->_sections['slide_page']['iteration'] <= $this->_sections['slide_page']['total'];
                 $this->_sections['slide_page']['index'] += $this->_sections['slide_page']['step'], $this->_sections['slide_page']['iteration']++):
$this->_sections['slide_page']['rownum'] = $this->_sections['slide_page']['iteration'];
$this->_sections['slide_page']['index_prev'] = $this->_sections['slide_page']['index'] - $this->_sections['slide_page']['step'];
$this->_sections['slide_page']['index_next'] = $this->_sections['slide_page']['index'] + $this->_sections['slide_page']['step'];
$this->_sections['slide_page']['first']      = ($this->_sections['slide_page']['iteration'] == 1);
$this->_sections['slide_page']['last']       = ($this->_sections['slide_page']['iteration'] == $this->_sections['slide_page']['total']);
?>
					<a title="<?php echo $this->_tpl_vars['lang']['show_other_categories']; ?>
" accesskey="<?php echo $this->_sections['slide_page']['iteration']; ?>
" <?php if ($this->_sections['slide_page']['first']): ?>class="active"<?php endif; ?> href="javascript:void(0)"><span>&nbsp;</span></a>
				<?php endfor; endif; ?>
			</div>
			<div class="next" title="<?php echo $this->_tpl_vars['lang']['show_next_categories']; ?>
"></div>
		</div>
		
		<script type="text/javascript">
		<?php echo '
		$(document).ready(function(){
			$(\'div.categories\').flCatSlider({
				pages: '; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['pages_number'])) ? $this->_run_mod_handler('ceil', true, $_tmp) : ceil($_tmp)); ?>
<?php echo '
			});
		});
		'; ?>

		</script>
	<?php endif; ?>
	
	<script type="text/javascript">flynax.moreCategories();</script>
	
	<?php echo rlHook::load(array('name' => 'browsePostCategories'), $this);?>

	
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'content_block_footer.tpl') : smarty_modifier_cat($_tmp, 'content_block_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<?php else: ?>

	<?php if (! $this->_tpl_vars['category']['ID']): ?>
		<div class="info"><?php echo $this->_tpl_vars['lang']['listing_type_no_categories']; ?>
</div>
	<?php endif; ?>

<?php endif; ?>

<!-- categories block tpl -->